<?php
class Load {
	public static function loadCore ($class) {
		$path = explode('_', $class);
		$path = implode(DIRECTORY_SEPARATOR, $path);
		$type = 'IMUR';
		$fileName = ROOT . DIRECTORY_SEPARATOR . 'IMUR' . DIRECTORY_SEPARATOR . $path . '.php';
		//echo $fileName;
		if (file_exists($fileName)) {
			include($fileName);
			
			return;
		}
	}
	public static function loadApp ($class) {
		$path = explode('_', $class);
		$path = implode(DIRECTORY_SEPARATOR, $path);

		$fileName = ROOT . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . $path . '.php';
		//echo $fileName;
		if (file_exists($fileName)) {
			include($fileName);
			return;
		}
	}
}
//spl_autoload_register(array('Load', 'loadFile'));
spl_autoload_register('Load::loadCore');
spl_autoload_register('Load::loadApp');